#include "software_tone_library.h"
#include <softTone.h>

//software-tone-library
PHP_FUNCTION(softToneCreate)
{
    zend_long pin;

	ZEND_PARSE_PARAMETERS_START(1, 1)
		Z_PARAM_LONG(pin)
	ZEND_PARSE_PARAMETERS_END();

    long ret = softToneCreate(pin);
    RETURN_LONG(ret);
}

PHP_FUNCTION(softToneWrite)
{
    zend_long pin;
    zend_long freq;

	ZEND_PARSE_PARAMETERS_START(2, 2)
		Z_PARAM_LONG(pin)
		Z_PARAM_LONG(freq)
	ZEND_PARSE_PARAMETERS_END();

    softToneWrite(pin, freq);
}
//end for software-tone-library
